package gx.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import gx.dao.NewsDao;
import gx.entity.News;
import gx.entity.common.Page;
import gx.service.common.BaseService;

@Service
public class NewsService extends BaseService<News>{
	
	private NewsDao newsDao;

	public NewsDao getNewsDao() {
		return newsDao;
	}
	@Autowired
	public void setNewsDao(NewsDao newsDao) {
		this.newsDao = newsDao;
		super.setDao(this.newsDao);
	}
//	public List<News> findByName(String title){
//		return newsDao.findByName(title);
//		 
//	}
	public List<News> findNews(Integer news_cate){
		return newsDao.findNews(news_cate);
	}
	public Page<News> findByName(int size, int number, String condition) {
		// TODO Auto-generated method stub
		return newsDao.findByName(size,number,condition);
	}
}
